<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<div class="content_container">
    <div id="form_changepwd">
        <?php $attr = array(
                    'name' => 'form_newpwd'
                );
        ?>
        <?php echo form_open('profile/submit_newpwd', $attr); ?>
        <div class="name_label">Enter your current Password :</div><div id="curr_pwd"><?php echo form_password($currpwd); ?></div>
        <div class="name_label">Enter your new Password : </div><div id="new_pwd"><?php echo form_password($newpwd); ?></div>
        <?php echo form_submit('submit_newpwd', 'Submit'); ?>
        <?php echo form_close();?>
        <?php 
            if ($fail){
                ?>
        <div id="fail_changepwd">
               Current password does not match
        </div>
                <?php
            }
            else if ($success){
                ?>
        <div id="success_changepwd">
                Password has been changed successfully
        </div>
                <?php
            }
        ?>
        <div id="back"><a href="<?= base_url(). index_page(). '/profile/home'?>">Back</a></div>
    </div>
</div>